import 'package:flutter/material.dart';

class CoustomScrollViewCase extends StatelessWidget {
  const CoustomScrollViewCase({super.key});

  @override
  Widget build(BuildContext context) {
    return CustomScrollView(
      slivers: [
        SliverGrid.builder(
          gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
              crossAxisCount: 3,
              crossAxisSpacing: 3,
              mainAxisSpacing: 3,
              childAspectRatio: 1 / 1),
          itemBuilder: (context, index) {
            return Container(
              color: const Color.fromARGB(255, 160, 131, 141),
              alignment: Alignment.center,
              child: const Text(
                '年薪百万',
                style: TextStyle(fontWeight: FontWeight.w800, fontSize: 20),
              ),
            );
          },
          itemCount: 6,
        ),
        SliverList.separated(
          itemBuilder: (context, index) {
            return Container(
              height: 100,
              color: Colors.blue,
              alignment: Alignment.center,
              child: const Text('蔡法宗'),
            );
          },
          itemCount: 10,
          separatorBuilder: (BuildContext context, int index) {
            return const Divider(
              height: 1,
              color: Colors.orange,
            );
          },
        )
      ],
    );
  }
}
